<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php $this->load->view('admin/header.html')?>
<script type="text/javascript" src="<?php echo base_url()?>common/js/validateForm.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/js/MyJs.js"></script>
<script type="text/javascript">
    $(function () {
        $.validate_question('ajax_form');
    });
    function Success(data) {
        $.Success(data);
    }
</script>
<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">
        DouPHP 管理中心
    </div>
    <div id="manager" class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3>常见问题添加</h3>
        <form id="ajax_form" action="<?php echo site_url('admin/question/add_question')?>" method="post">
            <input id="question_id" name="question_id" type="hidden" value="<?php echo !empty($questionModel)?$questionModel->question_id:0?>" />
            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                
                <tr>
                    <td width="100" align="right">问题</td>
                    <td>
                        <textarea id="q_contents" name="q_contents" style="height:200px;width:765px;resize:none;"><?php echo !empty($questionModel)?$questionModel->q_contents:""?></textarea>
                    </td>
                </tr>
                <tr>
                    <td width="100" align="right">回答</td>
                    <td>
                        <textarea id="a_contents" name="a_contents" style="height:200px;width:765px;resize:none;"><?php echo !empty($questionModel)?$questionModel->a_contents:""?></textarea>
                    </td>
                </tr>
                <tr>
                    <td width="100" align="right">权重</td>
                    <td>
                        <input type="text" name="weight" id="weight" size="40" class="inpMain " value="<?php echo !empty($questionModel)?$questionModel->weight:0?>" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" class="btn" value="<?php echo !empty($questionModel)?"修改":"添加"?>" />
                        <input type="button" class="btn" value="返回" onclick="GoBack()" />
                    </td>
                </tr>
            </table>
        </form>
    </div>

</div>